<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>queryById.html</title>
</head>
<body>
<button onclick="getAppUser()">点我查询ID=3</button>

<button onclick="deleteAppUser()">点我删除ID=1</button>
<div id="show"></div>
<script language="JavaScript">

    function deleteAppUser(){
        fetch("/appUser/deleteById",{
            method: 'POST',
            headers: {
                'Accept':'application/json',
                'Content-Type': 'application/json',
            },
            body: JSON.stringify(1),
        }).then(response => response.json())
            .then(data => document.getElementById('show').textContent = JSON.stringify(data))
            .catch(error => console.error('Error:', error));
    }
    function getAppUser(){
        fetch("/appUser/queryById",{
            method: 'POST',
            headers: {
                'Accept':'application/json',
                'Content-Type': 'application/json',
            },
            body: JSON.stringify(3),
        }).then(response => response.json())
            .then(data => document.getElementById('show').textContent = JSON.stringify(data))
            .catch(error => console.error('Error:', error));
    }

</script>
</body>
</html>